<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="root">

    </div>
    <div id="box">

    </div>
</body>
<script src="../react.js"></script>
<script src="../react-dom.js"></script>
<!-- 将jsx语法转化为js语法 -->
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
<script type="text/babel">
    // jsx是js扩展语言 遵循js所有语法规范 jsx通常搭配react使用
    
    // 使用jsx语法创建虚拟dom   注意：不能存在多个跟标签
    let div = <div>好好学习天天向上</div>
    console.log(div)
    ReactDOM.render(div, document.getElementById("root"))
    let mian = (
        <main>
            <h1>哈哈哈哈</h1>
            <h2>嘿嘿黑黑</h2>
            <h3>啦啦啦啦啦</h3>
        </main>
    )
    ReactDOM.render(mian, document.getElementById("box"))
</script>

</html>